<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/templates/template.xhtml">

	<ui:define name="conteudoPagina">
			<h:form id="lista">
<!-- 			<p:graphicImage   value="#{eventoBean.imagem}" height="100" width="150"> -->
					
<!-- 			</p:graphicImage> -->


			<p:dataTable value="#{eventoBean.lista}" var="evento" border="1" >
			<f:facet name="header">Listagem de Eventos</f:facet>
			
			<p:column headerText="Id">
        		<h:outputText value="#{evento.id}" />
    		</p:column>
			
			<p:column headerText="Nome">
        		<h:outputText value="#{evento.nome}" />
    		</p:column>
    		
    		<p:column headerText="Genero">
        		<h:outputText />
    		</p:column>
			
			<p:column headerText="Local">
        		<h:outputText value="#{evento.local}" />
    		</p:column>
			
			<p:column headerText="Data Inicial">
        		<h:outputText value="#{evento.dataInicio}" />
    		</p:column>
			
			<p:column headerText="Data Final">
        		<h:outputText value="#{evento.dataFinal}" />
    		</p:column>
			
			<p:column headerText="Descrição">
        		<h:outputText value="#{evento.descricao}" />
    		</p:column>
			
			
			<p:column>
				<h:outputText id="foto" value="#{evento.photoId.photoData}" />
			</p:column>
			
	
			<p:column>
				<p:graphicImage value="#{evento.photoId.image}"> </p:graphicImage>
<!-- 				<p:graphicImage value="/resources/imagens/galeria1.jpg"/> -->
			</p:column>
			
			
			</p:dataTable>

		</h:form>
		
	</ui:define>
</ui:composition>

</html>